/* 《石钟山记》练习页面样式 */

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 练习布局 */
.practice-layout {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 4rem);
}

.practice-article-panel {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.practice-question-panel {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 文章头部 */
.article-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.article-title-inline h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.8rem;
}

.article-author-inline {
    color: #7f8c8d;
    font-style: italic;
    margin-top: 0.5rem;
}

.back-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background: #7f8c8d;
}

/* 文章内容 */
.article-content-inline {
    line-height: 2.2;
    font-size: 1.1rem;
    color: #2c3e50;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

/* 文章内容中的段落样式 */
.article-content-inline p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.article-content-inline h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* 加粗和下划线样式 */
.article-content-inline strong {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.05em;
}

.article-content-inline u {
    text-decoration: underline;
    text-decoration-color: #3498db;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.article-content-inline strong u {
    color: #c0392b;
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #f39c12;
}

/* 题目中的加粗和下划线样式 */
.question-text strong {
    color: #e74c3c;
    font-weight: bold;
}

.question-text u {
    text-decoration: underline;
    text-decoration-color: #3498db;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.question-text strong u {
    color: #c0392b;
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

/* 翻译题中的样式 */
.translation-text strong,
.translation-answer strong,
.translation-explanation strong {
    color: #e74c3c;
    font-weight: bold;
}

/* 高亮样式 */
.highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    border: 1px solid #ffeaa7;
}

/* 题目面板样式 */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.timer-display {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.timer-display.warning {
    background: #f39c12;
    animation: pulse 1s infinite;
}

.timer-display.danger {
    background: #e74c3c;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.question-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-info {
    color: #7f8c8d;
    font-size: 1rem;
}

.question-content {
    flex: 1;
    overflow-y: auto;
}

.question-text {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    line-height: 1.6;
}

.question-options {
    margin-bottom: 2rem;
}

.question-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.question-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.question-option input[type="radio"] {
    margin-right: 0.8rem;
    transform: scale(1.2);
}

.question-option .option-text {
    flex: 1;
}

.question-option .option-text strong {
    color: #e74c3c;
    font-weight: bold;
}

.question-option .option-text u {
    text-decoration: underline;
    text-decoration-color: #3498db;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.question-option .option-text strong u {
    color: #c0392b;
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

.question-option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.question-option.selected {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.question-option.correct {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.question-option.incorrect {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* 翻译题样式 */
.translation-question {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.translation-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.translation-answer {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.translation-answer h4 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

.translation-answer p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #ecf0f1;
}

.question-nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.question-nav-btn:hover:not(:disabled) {
    background: #2980b9;
}

.question-nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.question-nav-btn.next {
    background: #2ecc71;
}

.question-nav-btn.next:hover:not(:disabled) {
    background: #27ae60;
}

.question-nav-btn.finish {
    background: #e74c3c;
}

.question-nav-btn.finish:hover:not(:disabled) {
    background: #c0392b;
}

.question-nav-btn.submit {
    background-color: #28a745;
    color: white;
}

.question-nav-btn.submit:hover:not(:disabled) {
    background-color: #218838;
}

/* 结果页面 */
.practice-result {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.practice-result h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
}

.score-display {
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.score-circle span {
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.score-display p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.result-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: left;
}

.result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.result-item.correct {
    background: #e8f5e8;
    border-left-color: #4caf50;
}

.result-item.incorrect {
    background: #ffebee;
    border-left-color: #f44336;
}

.result-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.result-item p {
    margin-bottom: 0.3rem;
    color: #7f8c8d;
}

.result-item .correct-answer {
    color: #27ae60;
    font-weight: bold;
}

.result-item .user-answer {
    color: #e74c3c;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn, .home-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.retry-btn:hover {
    background: #2980b9;
}

.home-btn {
    background: #e67e22;
}

.home-btn:hover {
    background: #d35400;
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .practice-layout {
        flex-direction: column;
        height: auto;
    }
    
    .practice-article-panel {
        max-height: 400px;
    }
    
    .practice-question-panel {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .practice-layout {
        gap: 1rem;
    }
    
    .practice-article-panel,
    .practice-question-panel {
        padding: 1.5rem;
    }
    
    .question-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .question-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .question-nav-btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .retry-btn, .home-btn, .back-btn {
        width: 200px;
    }
}

/* 翻译题样式 */
.translation-input-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.translation-input-section h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
}

.translation-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.translation-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.translation-textarea:disabled {
    background-color: #e9ecef;
    opacity: 0.8;
}

.translation-submit-section {
    margin-top: 15px;
    text-align: center;
}

.submit-translation-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-translation-btn:hover {
    background-color: #0056b3;
}

.translation-answer {
    margin: 20px 0;
    padding: 15px;
    background-color: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.translation-answer h4 {
    margin: 0 0 10px 0;
    color: #0056b3;
    font-size: 16px;
}

.reference-answer {
    background-color: white;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #b3d7ff;
    margin: 10px 0;
    font-weight: 500;
}

.self-scoring-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.self-scoring-section h4 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 15px;
}

.score-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.score-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    background-color: white;
    border: 2px solid #ffeaa7;
    transition: all 0.3s ease;
}

.score-options label:hover {
    background-color: #fff8e1;
    border-color: #ffb74d;
}

.score-options input[type="radio"] {
    margin-right: 8px;
}

.score-options input[type="radio"]:checked + span {
    font-weight: bold;
    color: #e65100;
}

.score-options label:has(input[type="radio"]:checked) {
    background-color: #ffecb3;
    border-color: #ff9800;
}

/* 翻译题结果样式 */
.translation-result-item {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.translation-result p {
    margin: 8px 0;
    line-height: 1.5;
}

.translation-result p:first-child {
    color: #495057;
    font-weight: 600;
}

.translation-result p:nth-child(2) {
    background-color: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #2196f3;
}

.translation-result p:nth-child(3) {
    background-color: #e8f5e8;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #4caf50;
}

.translation-result p:last-child {
    font-weight: 600;
    color: #ff9800;
}

/* 翻译题综合样式 */
.translation-comprehensive {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.translation-sub-question {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.translation-sub-question:last-of-type {
    margin-bottom: 0;
}

.translation-sub-question .translation-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.translation-comprehensive .translation-submit-section {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f4fd;
    border-radius: 8px;
    border: 2px solid #007bff;
}

.translation-comprehensive .submit-translation-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.translation-comprehensive .submit-translation-btn:hover {
    background-color: #218838;
} 